package com.iot.mqtt.service.Impl;

import com.aliyun.iot.as.bridge.core.handler.UplinkChannelHandler;
import com.aliyun.iot.as.bridge.core.model.Session;
import com.iot.mqtt.service.AliCloud;
import com.iot.mqtt.service.MqttHookService;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("MqttHookServiceImpl")
public class MqttHookServiceImpl implements MqttHookService {
    /**
     * 上线
     */
    public void connected(Map<String,String> params){
        String originalIdentity = params.get("clientid");
        AliCloudImpl.connected(originalIdentity);
    }

    /**
     * 下线
     */
    public void disconnected(Map<String,String> params){
        String originalIdentity = params.get("clientid");
        AliCloudImpl.disconnected(originalIdentity);
    }
}
